export const registerFormRules = {
  alias: [
    {
      trigger: 'change',
      required: true,
      message: '请输入组织名称',
    },
    {
      trigger: 'change',
      pattern: /^[\u4E00-\u9FA5\x20a-zA-Z0-9_&-]+$/,
      message: '可输入中英文、数字、下划线、中划线、空格和&',
    },
    {
      trigger: 'change',
      min: 1,
      message: '至少输入1位字符',
    },
    {
      trigger: 'change',
      max: 100,
      message: '字符长度不超过100位',
    },
  ],
  name: [
    {
      trigger: 'change',
      required: true,
      message: '请输入组织名称',
    },
    {
      trigger: 'change',
      pattern: /[A-Za-z0-9-]{1,63}/,
      message: '可输入英文、数字、数字、中划线，最长63位',
    },
    {
      trigger: 'change',
      min: 1,
      message: '至少输入1位字符',
    },
    {
      trigger: 'change',
      max: 100,
      message: '字符长度不超过100位',
    },
  ],
  industry: [
    {
      trigger: 'change',
      required: true,
      message: '请选择所属行业',
    },
  ],
  location: [
    {
      trigger: 'change',
      required: true,
      message: '请选择所在地',
    },
  ],
  channel: [
    {
      trigger: 'change',
      required: true,
      message: '请选择来源渠道',
    },
  ],
  userName: [
    {
      trigger: 'change',
      required: true,
      message: '请输入用户名',
    },
    {
      trigger: 'change',
      pattern: /^[\u4E00-\u9FA5\x20a-zA-Z0-9_@.-]+$/,
      message: '可输入中英文、数字、下划线、中划线、.和@',
    },
    {
      trigger: 'change',
      min: 1,
      message: '至少输入1位字符',
    },
    {
      trigger: 'change',
      max: 64,
      message: '字符长度不超过64位',
    },
  ],
  phone: [
    {
      trigger: 'change',
      required: true,
      message: '请输入手机号码',
    },
    {
      pattern: /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/,
      message: '请输入正确的手机号码',
    },
  ],
  password: [
    {
      trigger: 'change',
      required: true,
      message: '请输入密码',
    },
    {
      pattern: /[a-zA-Z\d!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]{8,18}/,
      message: '请输入密码长度为8-18位,包含大小写字母、数字和特殊字符4类至少3类',
    },
  ],
};
